﻿	      <?php include("conn.php");
             mysql_query('SET NAMES UTF8'); 

	  

class MyPrizeBean
{
	public $fulse;

	function __construct($fulse)
	{
		$this->fulse      = $fulse;
	}
}


$rert30=mysql_query("select *from goodsorders where  ordersid ='".$_REQUEST[ordersid]."'");
$rowf=mysql_fetch_array($rert30);
$rert31=mysql_query("select *from shop where  shopid ='".$rowf[shopid]."'");
$rowf1=mysql_fetch_array($rert31);

	
	
$srat=mysql_query("update goodsorders set tuikuan='".$_REQUEST[state]."' where ordersid='".$_REQUEST[ordersid]."'");
/*
if($_REQUEST[state]==4)
{
$states=4;
$sdr=1;
$date=date("Y-m-d h:i:s");
$srat=mysql_query("INSERT INTO moneyrun(userid,state,money,addtime,yes) VALUES ('$rowf[userid]','$states','$rowf[totalprice]','$date','$sdr')");
$statess=5;
$srat=mysql_query("INSERT INTO moneyrun(userid,state,money,addtime,yes) VALUES ('$rowf1[userid]','$statess','$rowf[totalprice]','$date','$sdr')");

$srat=mysql_query("update user set money=money+'".$rowf[totalprice]."' where userid='".$rowf[userid]."'");

}
	*/

	      if($srat==true)
	     {
		  $der=100;
		  
		  }
		
		 else
		  {
		   $der=300;
		  }

$prize[] = new MyPrizeBean($der);
echo json_encode($prize);


?>